package team.pra.manager.service;

import team.pra.manager.pojo.SysToken;
import team.pra.manager.pojo.User;

import java.util.Map;

public interface ShiroService {
    /**
     * Find user by username
     */
    User findByUsername(String username);

    /**
     * create token by userId
     */
    Map<String,Object> createToken(Integer userId);

    /**
     * logout
     */
    void logout(String token);

    /**
     * find token by token
     */
    SysToken findByToken(String accessToken);

    /**
     * find user by userId
     */
    User findByUserId(Integer userId);
}
